<?php

function smarty_function_get_about_by_id($params, &$smarty) 
{
  $about_id = $params['about_id'];
      $pntables = pnDBGetTables();

  if(isset($about_id)){
    //Query data
    $sql = "SELECT
              abo_how_to,
              abo_about_us,
              abo_contact_us,
              abo_map_lat,
              abo_map_lon
            FROM ".
              $pntables[ishopstore_about]
            ." WHERE
              abo_id = ".$about_id;

    $column = array("how_to","about_us","contact_us","map_lat","map_lon");
    $result = DBUtil::executeSQL($sql);
    $objectArray = DBUtil::marshallObjects ($result, $column);
    $smarty->assign("how_to", $objectArray[0]['how_to']);
    $smarty->assign("about_us", $objectArray[0]['about_us']);
    $smarty->assign("contact_us", $objectArray[0]['contact_us']);
    $smarty->assign("map_lat", $objectArray[0]['map_lat']);
    $smarty->assign("map_lon", $objectArray[0]['map_lon']);
    }

}
